import { AddressApi, setAddressApi } from '@zl-crud/components'
import axios from 'axios'

const baseUrl = '/api/address'

// 配置地址接口实现
const addressApi: AddressApi = {
  // 获取省份
  getProvince: () => axios.get(baseUrl + '/province'),
  // 获取城市
  getCity: (code: any) => axios.get(baseUrl + '/city/' + code),
  // 获取区域
  getArea: (code: any) => axios.get(baseUrl + '/area/' + code),
}

// 设置全局地址接口实现
setAddressApi(addressApi)